.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  width: 100%;
  background-color: var(--body-color);
}

.nav {
  height: calc(var(--header-height) + 1.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 1rem;
}

.nav-logo,
.nav-toggle {
  color: var(--title-color-dark);
  font-weight: var(--font-medium);
}

.nav-list {
  display: flex;
  column-gap: 2rem;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: var(--small-font-size);
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: 0.3s;
}

.nav-icon,
.nav-close,
.nav-toggle {
  display: none;
}

.changeTheme i {
  cursor: pointer;
}

/* active link */
.active-link,
.nav-link:hover {
  color: var(--title-color-dark);
}

/* change background color */
.scroll-header {
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
}

/*========== 媒体查询 ==========*/
@media screen and (max-width: 768px) {
  .header {
    top: initial;
    bottom: 0;
  }

  .nav {
    height: var(--header-height);
  }

  .nav-menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    padding: 2rem 1.5rem 4rem;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
    border-radius: 1.5rem 1.5rem 0 0;
    transition: 0.4s;
  }

  /* show-menu */
  /* Show Menu */
  .show-menu {
    bottom: 0;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .nav-icon {
    font-size: 1.2rem;
  }

  .nav-close {
    position: absolute;
    right: 1.3rem;
    bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
  }

  .changeTheme {
    position: absolute;
    left: 1.3rem;
    bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
  }

  .nav-close:hover {
    color: var(--title-color-dark);
  }

  .nav-toggle {
    font-size: 1.1rem;
    cursor: pointer;
  }

  .nav-icon,
  .nav-close,
  .nav-toggle {
    display: block;
  }
}

@media screen and (max-width: 350px) {
  .nav-menu {
    padding: 2rem 0.25rem 4rem;
  }

  .nav-list {
    column-gap: 0;
  }
}